<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Easapps</title>

<meta name="description" content="login page" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<load href="assets/css/bootstrap.min.css" />
<load href="assets/css/font-awesome.min.css" />
<load href="assets/css/beyond.min.css" />
<load href="assets/css/nimate.min.css" />

</head>

<body>
    <div class="login-container animated fadeInDown">
        <div class="loginbox bg-white">
            <div class="loginbox-title">会员登录</div>
            <div class="loginbox-or">
                <div class="or-line"></div>
            </div>
            <div class="loginbox-textbox">
                <input name="account" type="text" class="form-control" placeholder="登陆账号或邮箱" />
            </div>
            <div class="loginbox-textbox">
                <input type="password" name="password" class="form-control" placeholder="登陆密码" />
            </div>
            <div class="loginbox-submit">
                <input type="button" class="btn btn-login btn-primary btn-block" value="登陆">
                <a href="" class="btn btn-defalut btn-block" >注册</a> 
            </div>
        </div>
    </div>

<script src="assets/jquery.min.js"></script>
<script src="assets/jquery.bootstrap-growl.js"></script>
</body>
<load href="assets/nprogress/nprogress.css" />
<script src="assets/nprogress/nprogress.js"></script>
<script type="text/javascript">
$(function(){
    $('.btn-login').on('click',function(){
        NProgress.start();
        var account = $('input[name=account]').val();
        var password = $('input[name=password]').val();
        var url = "{:U('Public/ckLogin')}";
        $.post(url,{account:account,password:password},function(req){
            if (req['status'] == '0') {
                $.bootstrapGrowl(req['info'], {
                    type: 'danger',
                    align: 'center',
                });
                NProgress.done();
                //
            }
            if (req['status'] == '1') {
                NProgress.done();
                window.location.href = req['url'];
            };
        })
    })
})    
</script>
</html>
